#include <iostream>

using namespace std;

int n; 
int maxv = 1, cnt = 1;
int last;

int main()
{
	cin >> n;
	cin >> last;
	
	for (int i = 1; i < n; i ++ )
	{
		int v;
		cin >> v;
		
		if (v == last) cnt ++ ;
		else cnt = 1;
		
		last = v;
		maxv = max(cnt, maxv);
	}	
	
	cout << maxv << endl;
	
	return 0;
}
